package org.spring.bean.factory.config;

import org.tool.core.lang.Assert;

/**
 * 用于属性值对象的不可变占位符类，当它是对工厂中另一个 bean 名称的引用时，将在运行时解析。
 *
 * @author 李坤
 * @date 2022/4/22 22:54
 */
public class RuntimeBeanNameReference implements BeanReference {

    private final String beanName;

    public RuntimeBeanNameReference(String beanName) {
        Assert.hasText(beanName, "Bean name must not be empty");

        this.beanName = beanName;
    }

    @Override
    public String getBeanName() {
        return beanName;
    }

}
